package com.hyt.it.ogt.ykcj.common.enums.zs;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Description:    证书发布设置：1-与成绩发布关联，2-单独发布证书
 * @Author: STARF
 * @CreateDate: 2022/06/24 15:12
 **/
@Getter
@AllArgsConstructor
public enum CertificatePublishTypeEnums {

    RELATION_CJ_PUBLISH(1, "与成绩发布关联"),
    SINGLE_PUBLISH(2, "单独发布证书"),
    ;

    private final Integer code;
    private final String desc;

    public static CertificatePublishTypeEnums getByCode(Integer code) {
        for (CertificatePublishTypeEnums enums : values()) {
            if (enums.getCode().equals(code)) {
                return enums;
            }
        }
        return null;
    }
}
